package com.zhima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhima.entity.OjQuestionPublish;
import com.zhima.vo.QuestionBankContestEditQuestionVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zhima
 * @since 2023-08-25
 */
@Mapper
public interface OjQuestionPublishMapper extends BaseMapper<OjQuestionPublish> {

    boolean increaseSubmitNum(@Param("questionId") Long questionId);

    boolean increaseAcNum(@Param("questionId") Long questionId);

    Long getQuestionIdByQuestionNumber(@Param("questionNumber") String questionNumber);

    List<QuestionBankContestEditQuestionVO> assembleQuestion(@Param("questionIds") List<Long> questionIds);

    List<Integer> listFullMarks(@Param("questionIds") List<Long> questionIds);

    List<BigDecimal> listQuestionPassingRates(@Param("questionIds") List<Long> questionIds);
}
